home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 19
/
Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso
/
Aminet
/
gfx
/
edit
/
universalgio.lha
/
UniversalGIO
/
HHsMakeAnim.rx
< prev
next >
Wrap
Text File
|
1996-07-20
|
2KB
|
77 lines
/* MakeAnim.rx for Photogenics © by Helmut Hoffmann 1996 */
/* Make HHsYUVSq animation from a directory of pictures */
/* with Photogenics 2 or higher */
OPTIONS RESULTS
if ~SHOW('p','PHOTOGENICS.1') then do
say "This script needs a running Photogenics 2 or higher"
say "and HHsYUSSqSaver.gio to convert animations"
exit
end
say "Please switch to Photogenics screen for file selection."
address PHOTOGENICS.1
PgsToFront
address command
'requestfile pubscreen "Photogenics" noicons title "Select source directory:" >ENV:HHsYUVAnimSource'
if rc~=0 then exit
'list $HHsYUVAnimSource pat ~(#?.info) files lformat %f%n >t:HHsAnimList'
if (open(SourceList,'t:HHsAnimList','READ')=0) then do
say "Can't read file list"
'wait 5'
exit
end
framemax=0
DO FOREVER
sourcefile=READLN(SourceList)
if length(sourcefile)=0 then leave
framemax=framemax+1
END
say "Number of files found:" framemax
if framemax=0 then exit
close(SourceList)
'sort t:HHsAnimList to t:HHsAnimListS'
if (open(SourceList,'t:HHsAnimListS','READ')=0) then do
say "Can't read file list"
'wait 5'
exit
end
address PHOTOGENICS.1
asksavefile '"Select destination HHsYUVSq animation name"' ""
if rc~=0 then exit
destanim=result
say "Creating animation:" destanim
OpenProgress '"Animation creation"' '"Anim creation begins..."'
frame=1
DO FOREVER
sourcefile=READLN(SourceList)
if length(sourcefile)=0 then leave
say "Processing file" sourcefile
SetProgress '"Load 'sourcefile'"' (frame*2-1)*50/framemax
if result=0 then leave
LoadHide '"'sourcefile'"'
if rc~=0 then leave
buffer=result
say "Trying to save frame " frame
SetProgress '"Save frame 'frame'"' frame*100/framemax
if result=0 then do
CLOSE buffer
leave
end
SAVE buffer "HHsYUVSequence" "" destanim
if rc~=0 then do
CLOSE buffer
SHOWERROR '"Animation creation failed! Check image dimensions etc..."'
leave
end
CLOSE buffer
frame=frame+1
END
CloseProgress